package com.ruoyi.huanghefd.mapper;

import org.apache.ibatis.annotations.Param;

import com.ruoyi.huanghefd.domain.WorkApproveSheet;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author gnplum
 * @description 针对表【work_approve_sheet(作业审批单)】的数据库操作Mapper
 * @createDate 2024-12-12 15:04:59
 * @Entity com.ruoyi.huanghefd.domain.WorkApproveSheet
 */
@Mapper
public interface WorkApproveSheetMapper extends BaseMapper<WorkApproveSheet> {

    /**
     * @param workApproveSheet
     * @return int
     * @Author gnplum
     * @Description 新增作业审批单
     * @Date 15:15 2024/12/12
     **/
    int insertAll(WorkApproveSheet workApproveSheet);

    /**
     * @param asCode
     * @return int
     * @Author gnplum
     * @Description 删除作业审批单
     * @Date 15:18 2024/12/12
     **/
    int delByAsCode(@Param("asCode") String asCode);

    /**
     * @param workApproveSheet
     * @return int
     * @Author gnplum
     * @Description 更新作业审批单
     * @Date 15:20 2024/12/12
     **/
    int updateByAsCode(WorkApproveSheet workApproveSheet);

    /**
     * @param asCode
     * @param asDept
     * @param asState
     * @param userId
     * @param mailType
     * @param asType
     * @param startIndex
     * @param pageSize
     * @return java.util.List<com.ruoyi.huanghefd.domain.WorkApproveSheet>
     * @Author gnplum
     * @Description 分页查询作业审批单列表
     * @Date 15:32 2024/12/12
     **/
    List<WorkApproveSheet> queryWorkApproveSheetListByPage(@Param("asCode") String asCode, @Param("asDept") String asDept, @Param("asState") String asState, @Param("userId") String userId, @Param("mailType") String mailType, @Param("asType") String asType, @Param("startIndex") int startIndex, @Param("pageSize") int pageSize);

    /**
     * @Author gnplum
     * @Description //查询作业审批单 分页数量
     * @Date 15:48 2024/12/12
     * @param asCode
     * @param asDept
     * @param asState
     * @param userId
     * @param mailType
     * @param asType
    * @return int
    **/
    int getWorkApproveSheetNum(@Param("asCode") String asCode, @Param("asDept") String asDept, @Param("asState") String asState, @Param("userId") String userId, @Param("mailType") String mailType, @Param("asType") String asType);

    /**
     * @Author gnplum
     * @Description 获取作业审批单编号
     * @Date 15:50 2024/12/12
     * @param PJLX
    * @return int
    **/
    int getAsCodeNum(@Param("PJLX") String PJLX);

    /**
     * @Author gnplum
     * @Description 获取正在执行的作业单数量
     * @Date 15:51 2024/12/12
     * @param userId
    * @return int
    **/
    int getExeSheetNum( @Param("userId") String userId);

}




